<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<div id="pop_up_content">
	<div class="pop_up_title images_13">
			编辑客户跟踪
	</div>
	<div class="pop_up_body">
		<form id="customerTrackingEdit" action="editCustomerTracking.action" >
			<input type="hidden" id="createDate" name="trackingForm.createDate" type="text" value="${trackingForm.createDate}">
			<input type="hidden" id="id" name="trackingForm.id" type="text" value="${trackingForm.id}">
			<table border="0" cellpadding="0" cellspacing="0" width="450px">
				<s:if test="trackingForm.customerId!=null&&trackingForm.customerId!=''">
					<input type="hidden" id="customerId" name="trackingForm.customerId" type="text" value="${trackingForm.customerId}">
				</s:if>
				<s:else>
					<tr style="height:22px;">
					<td class="form_input_value" >
							<span class="red">*</span>客户
					</td>
					<td colspan="3">
					   <select id="prodPriceData_subjectIdNew" name="trackingForm.customerId"  style="width: 260px">
							<option value="0">---请选择---</option>
							<s:iterator id="customerList" value="customerWrapperList" status="status">
								<option value="${id}" <s:if test="id==trackingForm.customerId">selected="selected"</s:if>><s:property value="companyName"/></option>
							</s:iterator>
						</select>
					</td>
				</tr>
				</s:else>
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red">*</span>跟踪名称
					</td>
					<td  colspan="3">
						<s:select id="tList" list="tList" name="trackingForm.trackingInfoId" headerKey="" headerValue="请选择" listKey="id" listValue="type+' - '+name" value="trackingForm.trackingInfoId" theme="simple" cssClass="required" style="width: 260px"/>
					</td>
				</tr>
				
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red">*</span>业务员
					</td>
					<td  colspan="3">
						<input style="width:260" readonly="readonly" id="userCname" name="userCname" type="text" value="<s:property value="#session.user.userCname"/>" class="required validate_forbiddenChar max_length:40">
					</td>
				</tr>
				
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red">*</span>跟踪时间
					</td>
					<td  colspan="3">
						<input style="width:260" readonly="readonly" onclick="WdatePicker();"  id="trackingForm.trackingDate" name="trackingForm.trackingDate" type="text" value="${trackingForm.trackingDate}" class="longinput required">
					</td>
				</tr>
				<tr style="height:22px;">
					<td class="form_input_value">
							<span class="red">*</span>跟踪内容
					</td>
					<td  colspan="3">
						<textarea rows="4" style="width:260px;height:100px;overflow-y:scroll;overflow-x:hidden;margin-left: 8px;" id="trackingForm.content" name="trackingForm.content" class="required max_length:255"><s:property value="trackingForm.content"/></textarea>
					</td>
				</tr>
			
				<tr style="height:22px;">
					<td></td>
					<td colspan="3">
						<input id="customerTrackingEditSubmit" type="button" value="确定" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
						<input type="button" value="取消" class="btn" onclick="hideDialog()" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>
<script>
	
	/* 表单提交 */
	i.formSubmit("customerTrackingEditSubmit",	//绑定的按钮id
					  "customerTrackingEdit" ,   //提交的表单id
					  function(result){
						  	var jsonMsgObj=new JsonMsgObj(result);
							var  msg=jsonMsgObj.getMessage();
						    var codeId=jsonMsgObj.getCodeid();
							var isOk=jsonMsgObj.getIsok();
							if( isOk ){
							    aerouiAlert(msg);
								hideDialog();// 隐藏窗口
								window.location.reload();
							}else{		// 如果编辑失败了
							  JsManageInfoHandleException( result , function(msg , codeId , isOk){
							  		hideDialog();// 隐藏窗口
							   });
						   }
						});
</script>